<template>
  <!-- 验证信息 -->
  <a-card :bordered="false" style="margin-bottom: 50px">
    <title-name title="验证信息"></title-name>
    <CustomForm ref="ruleForm" :is-validate="true" 
    :formList="formList" :form="form" :editModel="editModel == 2 ? 'V' : 'E'" :isEmit="false" />
  </a-card>
</template>

<script>
export default {
  name: 'a' + Date.now(),
  props: {
    // 表单
    form: {
      type: Object,
      default: () => ({})
    },
    // 操作类型：0 新增，1 编辑，2 查看，3 验证，4 生成整改单
    editModel: {
      type: [String, Number],
      default: () => '0'
    }
  },
  computed: {
    // 表单配置
    formList() {
      return [
        {
          type: 'a-select',
          label: '验证结果',
          keyName: 'status',
          viewName: 'statusName',
          data: [
            {
              value: 'QUALIFIED',
              label: '合格'
            },
            {
              value: 'UNQUALIFIED',
              label: '不合格'
            }
          ],
          rule: {
            required: true,
            message: '请选择验证结果',
            trigger: 'change'
          }
        }
      ]
    }
  }
}
</script>